Skip to content

Fix Slack file uploads for newer slack_sdk versions - #1

Open
maxkueng wants to merge 2 commits into
morozgrafix:masterfrom
maxkueng:fix-slack-upload
Open

Fix Slack file uploads for newer slack_sdk versions#1
maxkueng wants to merge 2 commits into
morozgrafix:masterfrom
maxkueng:fix-slack-upload

Conversation

@maxkueng

Copy link
Copy Markdown

This fixes Slack file uploads with current versions of slack_sdk.

Slack snapshot uploads fail with a channel_not_found error when using recent versions of slack_sdk.

files_upload_v2() now expects channel (singular) when uploading to a single channel, whereas the legacy files.upload API used channels.

There was a transitional period in slack_sdk where files_upload_v2() still accepted a single channel ID via the channels argument for compatibility, which is likely why this fork worked initially. Starting with v3.35.0, channels is treated as a list of channel IDs, so single-channel uploads should use the channel argument instead.

Since the dependency is specified as slack_sdk>3.23.0, current installs of the plugin will install newer SDK versions (latest is 3.43.0) and fail when attempting to upload webcam snapshots to Slack.

@maxkueng

Copy link
Copy Markdown
Author

Maybe it's pointless, considering your fraschetti#141 PR has been ignored for over a year, but if you merge this PR you might want to update that other PR as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant